// 频繁触发
// 耗时操作
var debounce = function (callback, duration) {
    var timerId;

    return function () {
        var curthis = this
        clearTimeout(timerId)
        timerId = setTimeout(function () {
            callback.apply(curthis)
        }, duration)
    }
}

// debounce(function () {

// }, 1000)